package com.malamute.system.entity;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.malamute.core.entity.BaseEntity;

/**
 * @description 角色
 * @date 
 * @version v1.0
 */
@Entity
@Table(name = "T_SYS_ROLE")
public class Role extends BaseEntity {

	private String name;// 角色名称

	@OneToMany(targetEntity = User.class, mappedBy = "role")
	private List<User> users;

	@OneToMany(targetEntity = Privilege.class, mappedBy = "role")
	private List<Privilege> privileges;// 权限列

	/**
	 * 获取name
	 * 
	 * @return name
	 */

	public String getName() {
		return name;
	}

	/**
	 * 设置name
	 * 
	 * @param name
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * 获取users
	 * 
	 * @return users
	 */

	public List<User> getUsers() {
		return users;
	}

	/**
	 * 设置users
	 * 
	 * @param users
	 */
	public void setUsers(List<User> users) {
		this.users = users;
	}

}
